package jp.co.sn.mml.pojo.tmpnryz;

import jp.co.sn.mml.pojo.tmyz.Tmyz;

public class TmpnryzId implements java.io.Serializable { 

	//パネルコード
	private String pnrCd;
	//薬剤コード
	private Tmyz yzCd;

	/** default constructor */
	public TmpnryzId(){

	}

	/** full constructor */
	public TmpnryzId(String pnrCd,Tmyz yzCd){
		this.pnrCd = pnrCd;
		this.yzCd = yzCd;
	}

	//Property accessors
	public String getPnrCd(){
		return this.pnrCd;
	}

	public void setPnrCd(String pnrCd){
		this.pnrCd=pnrCd;
	}

	public Tmyz getYzCd(){
		return this.yzCd;
	}

	public void setYzCd(Tmyz yzCd){
		this.yzCd=yzCd;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmpnryzId))
			return false;

		TmpnryzId castOther = (TmpnryzId) other;

		return ((this.getPnrCd() ==  castOther.getPnrCd())
				||(this.getPnrCd()!=null && castOther.getPnrCd() !=null 
					&& castOther.getPnrCd() !=null 
					&& this.getPnrCd().equals(castOther.getPnrCd())))
			&& ((this.getYzCd() ==  castOther.getYzCd())
				||(this.getYzCd()!=null && castOther.getYzCd() !=null 
					&& castOther.getYzCd() !=null 
					&& this.getYzCd().equals(castOther.getYzCd())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getPnrCd() == null ? 0 : this.getPnrCd().hashCode());
		result = 37 * result
				+ (getYzCd() == null ? 0 : this.getYzCd().hashCode());
		return result;
	}

}